import './MySwipe.scss'

import React, { Component } from 'react';
import {index_banner} from '../../utils/api'
import { Swiper } from 'react-vant';
// import { items } from './demo/items';
// import './demo/base.less';

class MySwipe extends Component {
    constructor(props){
        super(props);
        this.state = {
            list:[]
        }
    }
    componentDidMount(){
        index_banner().then((res)=>{
            // console.log(res.data.list)
            this.state.list = res.data.list
            console.log(this.state.list)
        })
    }
    render() {
        return (
            <div className='demo-swiper'>
                <img src='https://img1.baidu.com/it/u=2474074553,3542865848&fm=253&fmt=auto&app=138&f=JPEG?w=658&h=342' />
            </div>
            // <div className="demo-swiper">
            //     <Swiper autoplay={5000}>{this.state.list.pic}</Swiper>
            // </div>
        );
    }
}

export default MySwipe;